<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Contact</title>
    {include file="public/css"}
    <link rel="stylesheet" href="__ADMIN__/lib/layui/css/layui.css">
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
</head>

<body>
    <div class="preloader">
        <span class="preloader-spin"></span>
    </div>
    <div class="site">
        {include file="public/head"}
        <div class="page-title sp" style="background-image: url(__INDEX__/images/page-title.jpg)">
            <div class="container text-center">
                <h2>Contact Us</h2>
                <p>Malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae.</p>
            </div>
        </div>
        <div class="contact-area sp">
            <div class="container">
                <div class="row">
                    <div class="col-md-5 contact-info">
                        <div class="single-info">
                            <h5>Phone</h5>
                            <p>+(86) - 131 - 9852 - 2552</p>
                        </div>
                        <div class="single-info">
                            <h5>Email</h5>
                            <p>guo_ali@aliyun.com</p>
                        </div>
                        <div class="single-info">
                            <h5>Address</h5>
                            <p>公司企业网站开发，后台管理系统</p>
                        </div>
                        <div class="single-info">
                            <h5>Social</h5>
                            <p>
                                <a href="javascript:;" class="fa fa-facebook"></a>
                                <a href="javascript:;" class="fa fa-twitter"></a>
                                <a href="javascript:;" class="fa fa-linkedin"></a>
                                <a href="javascript:;" class="fa fa-pinterest"></a>
                            </p>
                        </div>
                    </div>
                    <div class="col-md-7">
                        <form action="#" class="contact-form">
                            <div class="row">
                                <div class="col-lg-6">
                                    <input type="text" placeholder="姓名" id="name">
                                </div>
                                <div class="col-lg-6">
                                    <input type="email" placeholder="邮箱" id="email">
                                </div>
                                <div class="col-lg-12">
                                    <input type="text" placeholder="需求" id="need">
                                </div>
                                <div class="col-lg-12">
                                    <textarea placeholder="对网站简单备注" id="desc"></textarea>
                                </div>
                                <div class="col-lg-12">
                                    <input class="button" type="submit" id="submit" value="Send Message">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- <div class="google-map"></div> -->
        {include file="public/foot"}
    </div>
    {include file="public/js"}
</body>
<script>
    layui.use('layer', function(){
        var layer = layui.layer;
    });  
    $('#submit').click(function (e) { 
        e.preventDefault();
        $.ajax({
            type:'post',
            url:'{:url(\'Index/AddContact\')}',
            dataType:'json',
            data:{
                'name':$('#name').val(),
                'email':$('#email').val(),
                'need':$('#need').val(),
                'desc':$('#desc').val()
            },
            success:function(dat){
                if(dat.stat == 1){
                    layer.alert(dat.msg,{icon:6},function(){
                        var index = layer.open();
                        layer.close(index);
                        location.reload();
                    })
                }else{
                    layer.alert(dat.msg,{icon:5},function(){
                        var index = layer.open();
                        layer.close(index);
                        location.reload();
                    })
                }
            }
        })
    });
</script>
</html>